using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CHEnhanceEfCore.Models
{
    /// <summary>
    /// author: chenhao
    /// </summary>
    [Table("user_task")]
    public class UserTask : BaseModel
    {
        /// <summary>
        /// 主键id
        /// </summary>
        [Key]
        [Column("id")]
        public Guid id { get; set; }

        /// <summary>
        /// 发布人id
        /// </summary>
        [Column("sender_id")]
        public Guid senderId { get; set; }

        /// <summary>
        /// 接单人id
        /// </summary>
        [Column("receiver_id")]
        public Guid receiverId { get; set; }

        /// <summary>
        /// 任务内容 { anonymous:"",text:"",address:"",phone:""}
        /// </summary>
        [Column("content")]
        public string content { get; set; }

        /// <summary>
        /// 截止日期
        /// </summary>
        [Column("due_date")]
        public DateTime dueDate { get; set; }

        /// <summary>
        /// 佣金
        /// </summary>
        [Column("commission")]
        public decimal commission { get; set; }

        /// <summary>
        /// 任务状态(-1:已取消,0:待接单,1:已接单,2:送单中,3:待确认,4:已完成,5:售后中)
        /// </summary>
        [Column("status")]
        [Description]
        public int status { get; set; }
    }
}